function switchPanel(id, nid, path,type){
	var requestURL=path;
	switch(type){
		case 1:
			requestURL+="/admin/getSomeImage.htm?type=slider&nodeid=";
			break;
		case 2:
			requestURL+="/admin/redirect.htm?nodeid=";
			break;
		case 3:
			requestURL+="/admin/getNews.htm?nodeid=";
			break;
		case 4:
			requestURL+="/admin/getSomeImage.htm?type=case&nodeid=";
			break;
		case 5:
			requestURL+="/admin/redirect.htm?nodeid=";
			break;
		case 6:
			requestURL+="/admin/getAbout.htm?nid=";
			break;
		default:
			requestURL+="/admin/getNews.htm?nodeid=";
	}
    var html = "<tr  height='20'><td colspan='2' >加载中...</td></tr>";
    var tableN = $("#" + id);
    tableN.html(html);
    if (tableN.is(":hidden")) {
		tableN.show();
        $.ajax({
            type: "GET",
            url: path + "/admin/getNodes.htm?nodeid=" + nid,
            dataType: "json",
            success: function(nodes){
                nodes = eval(nodes);
                var tableHtml = "";
                for (var n in nodes) {
                    var trHtml = "<TR height=20><TD align='center' width=30><IMG height=9 src='../images/menu_icon.gif' width=9></TD><TD><A class=menuChild href='" +requestURL+nodes[n].id+"' target='main'>" +nodes[n].nodeName +"</A></TD></TR>";
                    tableHtml += trHtml;
                }
                tableHtml += "<TR height=4><TD colSpan=2></TD></TR>";
                $("#" + id).html(tableHtml);
            },
            error: function(){
                var html = "<tr  height='20'><td colspan='2' >加载失败...请重试</td></tr>";
                $(this).html(html);
            }
        });
    }else{
		tableN.hide();
	}
}

function logout(path){
	if(confirm("你要注销吗？")){
			window.parent.location.href=path+"/logout.htm";
		}
}